/***
 * @Author: 玄绮 shijiahansi@qq.com
 * @Date: 2024-06-10 21:17:41
 * @LastEditors: 玄绮 shijiahansi@qq.com
 * @LastEditTime: 2024-06-10 21:21:00
 * @FilePath: \client\src\tools\http\DownloadFIle.h
 * @Description:
 * @
 * @Copyright (c) 2024 by 玄绮, All Rights Reserved.
 */
#include <QNetworkAccessManager>
#include <QObject>
#include <memory>

class DownloadFile : public QObject {
    Q_OBJECT
protected:
    static QNetworkAccessManager manager;

public:
    DownloadFile(QObject* parent = nullptr);
    ~DownloadFile();

    void download(QString url);

signals:
    void finished(std::shared_ptr<QByteArray> data);

protected:
    void on_readyRead();
    void on_finished();
};
